package com.xgry.bpm.api.base.sqlservice.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import javax.servlet.http.HttpSession;

public interface SqlService {

    //主表具体数据内容查询接口
    JSONArray findsAll(int formListId) throws Exception;

    JSONArray findsPage(int formListId, Integer pageIndex, Integer pageSize)throws Exception;

    void createTable(JSONObject jsonObject) throws Exception;

    void createTableKey(JSONObject jsonObject) throws Exception;

    JSONObject deleteTable(JSONArray jsonArray) throws Exception;

    void createSTable(JSONObject jsonObject) throws Exception;

    JSONObject insertData(JSONArray jsonArray) throws Exception;

    JSONObject updateData(JSONArray jsonArray) throws Exception;

    void newCreateField(JSONObject jsonObject) throws Exception;

    void createKey(JSONObject jsonObject) throws Exception;

    JSONArray findAll(int formListId) throws Exception;

    JSONArray findById(JSONObject jsonObject)throws Exception;

    String Select()throws Exception;

    JSONArray casaedNew(JSONObject jsonObject)throws Exception;

    JSONObject Selected(JSONArray jsonArray)throws Exception;

    void insertusr(JSONArray jsonArray)throws Exception;

    String findCode(String str) throws Exception;

    String findSum(String str)throws Exception;

    String findFormState(String str)throws Exception;

    JSONArray findByParentLevel(String tableName, String parentLevel) throws Exception;

    JSONArray findByLike(int formListId, String findQuery)throws Exception;

    JSONArray casefind(int formListId)throws Exception;

    void deletefield(String tablename,String field)throws Exception;

    void insertImprest(JSONArray jsonArray)throws Exception;

    String insertExpensesReimbursementData(JSONArray jsonArray) throws Exception;

    JSONArray findFliter(String str) throws Exception;

    // 复制功能更改单据编号id
    JSONArray updateCodeId(JSONArray jsonArray, JSONObject jsonObject) throws Exception;

    // 通过结束日期-开始日期计算天数
    String day(String str) throws Exception;

    // 根据不同的报销标准类型获取报销标准金额
    String findStandardAmount(String str) throws Exception;

    // 查询所有终审单据
    JSONArray findAllFinalDocument() throws Exception;

    // 查询单据下的主子表所有数据
//    JSONObject selectDocumentsContent(JSONObject jsonObject) throws Exception;

    JSONArray selectDocumentsContent(JSONObject jsonObject) throws Exception;

    // 查询自己所有的审批
    JSONArray findAllTask(HttpSession session) throws Exception;


    //根据条件筛选查询自己所有的审批
    JSONArray findAllTaskByCondition(HttpSession session, JSONObject jsonStr) throws Exception;

    int count(int formListId) throws Exception;
}